using System.Diagnostics;

namespace SynoManager.DownloadStation.Plugins
{
    public class LocalSiteCredentialStore
    {
        public void Save(SiteCredential[] credentials)
        {
            Debug.WriteLine("Saving "  + credentials.Length + " credentials...", "LocalSiteCredentialStore");
            Properties.Settings.Default.SiteCredentials = credentials;
        }

        public SiteCredential[] Load()
        {
            Debug.WriteLine("Loading credentials...", "LocalSiteCredentialStore");
            return Properties.Settings.Default.SiteCredentials ?? new SiteCredential[0];
        }
    }
}